﻿@page "/redirection-not-found"
@page "/reexecution/redirection-not-found"

<RedirectionNotFoundComponent @rendermode="@RenderModeHelper.GetRenderMode(_renderMode)" WaitForInteractivity="true"/>

@code{
    [Parameter, SupplyParameterFromQuery(Name = "renderMode")]
    public string? RenderModeStr { get; set; }

    private RenderModeId _renderMode;

    protected override void OnInitialized()
    {
        if (!string.IsNullOrEmpty(RenderModeStr))
        {
            _renderMode = RenderModeHelper.ParseRenderMode(RenderModeStr);
        }
        else
        {
            throw new ArgumentException("RenderModeStr cannot be null or empty. Did you mean to redirect to /redirection-not-found-ssr?", nameof(RenderModeStr));
        }
    }
}
